-
-
Couldn't load subscription status.
- Fork 1.9k
Add optional intensity parameter for surfaces #314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
12a4865 to
cb9a14e
Compare
cb9a14e to
00109fd
Compare
src/traces/surface/attributes.js
Outdated
| }, | ||
| zauto: colorscaleAttrs.zauto, | ||
| zmin: colorscaleAttrs.zmin, | ||
| zmax: colorscaleAttrs.zmax, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, a couple things will need to happen here:
- rename
intensity->surfacecolor - add
cauto,cminandcmax(which will take up the role ofzauto,zminandzmaxrespectively) - move
zauto,zminandzmaxto the bottom of the attribute object in a_deprecatedblock (see example here) - add a backward-compatible block in
cleanData:
if(trace.type === 'surface') {
if(trace.zauto) trace.cauto = trace.zauto;
delete trace.zauto
/* and so on for 'zmin' and 'zmax'
}| "zmin": 0, | ||
| "zmax": "50" | ||
| "cmin": 0, | ||
| "cmax": "50" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The old zmin and zmax attributes should still work.
|
closed in favour of #347 |
This resolves #308
Please note that this PR requires the following feature in gl-surface3d being merged:
gl-vis/gl-surface3d#6
To use the new intensity parameter for surface, you just pass in a
data_arrayparameter type calledintensityto the surface. The behavior is analogous to mesh3d traces.Example image:
CC @etpinard